package com.sinping.qh.query.records;

import com.sinping.qh.query.base.Operator;
import com.sinping.qh.query.base.QueryParams;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author zhangjin
 * @create 2018/6/8
 */
public class RectifyReviewQuery implements QueryParams,Serializable {

    static Map<String, String> aliasMap = new HashMap<>();
    static Map<String, Operator> operatorMap = new HashMap<>();


    public void setHiddenDangerId(String hiddenDangerId) {
        this.hiddenDangerId = hiddenDangerId;
    }

    private String hiddenDangerId;

    public void setReType(String reType) {
        this.reType = reType;
    }

    private String reType;

    static {
        aliasMap.put("hiddenDangerId", "hidden_danger_id");
        aliasMap.put("reType", "re_type");

        operatorMap.put("hiddenDangerId", Operator.eq);
        operatorMap.put("reType", Operator.eq);

    }

    @Override
    public String getAlias(String fieldName) {
        return aliasMap.getOrDefault(fieldName, fieldName);
    }

    @Override
    public Operator getOperators(String fieldName) {
        return operatorMap.getOrDefault(fieldName, Operator.eq);
    }
}
